<?php
    chdir( dirname( __FILE__ ) . "/.." );

    require_once(dirname(__FILE__) . '/../includes/common.inc.php');
    
    $content = BlogParser::GetBlogRssFile();
    $blogLinksArray = BlogParser::ParseRssBlogToArray($content);
    if ( !empty($blogLinksArray) )
    {
    	if ( !BlogParser::IsCacheUpToDate($blogLinksArray) )
    	{
    		BlogParser::WriteArrayToCache($blogLinksArray);
    		BlogParser::RemoveOldRelatedCache();
    	}
    }
?>